<template>
  <div class="app-container">
    <el-form ref="form" :model="form" label-width="200px">
      <el-form-item label="楼盘名称：">
        <span>{{form.name}}</span>
      </el-form-item>
      <el-form-item label="楼盘封面：">
        <img width="148" height="148" :src="form.cover"/>
      </el-form-item>
      <el-form-item label="是否在售：">
        <span v-if="form.onSale">是</span>
        <span v-else>否</span>
      </el-form-item>
      <el-form-item label="支持预约：">
        <span v-if="form.dating">开启</span>
        <span v-else>关闭</span>
      </el-form-item>
      <el-form-item label="诚意金：">
      <span>{{form.sincer>0?form.sincer:'不支持'}}</span>
    </el-form-item>
      <el-form-item label="缴纳起始时间：">
        <span>{{form.time1}}</span>
      </el-form-item>
      <el-form-item label="缴纳结束时间：">
        <span>{{form.time2}}</span>
      </el-form-item>
      <el-form-item label="解冻时间解冻时间：">
        <span>{{form.time3||'待定'}}</span>
      </el-form-item>
      <el-form-item label="标签：">
        <div v-for="item in form.tags" style="margin-bottom: 10px">
          {{item}}
        </div>
      </el-form-item>
      <el-form-item label="楼盘简介：">
        <span>{{form.description}}</span>
      </el-form-item>
      <el-form-item label="均价(单位元)：">
        <span>{{form.price}}</span>
      </el-form-item>
      <el-form-item label="总价(单位万元)：">
        <span>{{form.totalPrice}}</span>
      </el-form-item>
      <el-form-item label="建面（单位㎡)：">
        <span>{{form.area}}</span>
      </el-form-item>
      <el-form-item label="类型：">
        <span>{{form.type}}</span>
      </el-form-item>
      <el-form-item label="户型文字：">
        <span>{{form.houseTypeText}}</span>
      </el-form-item>
      <el-form-item label="户型：">
        <div v-for="item in form.houseTypes" style="margin-bottom: 10px">
          {{'名称：'+item.name+'，面积：'+item.area+'/㎡'}}
        </div>
      </el-form-item>
      <el-form-item label="结构：">
        <span>{{form.structure}}</span>
      </el-form-item>
      <el-form-item label="开盘时间：">
        <span>{{form.time}}</span>
      </el-form-item>
      <el-form-item label="楼盘地址：">
        <span>{{form.address}}</span>
      </el-form-item>
      <el-form-item label="售楼处地址：">
        <span>{{form.saleAddress}}</span>
      </el-form-item>
      <el-form-item label="产权年限（年)：">
        <span>{{form.rightYear}}</span>
      </el-form-item>
      <el-form-item label="装修标准：">
        <span>{{form.decorationStandard}}</span>
      </el-form-item>
      <el-form-item label="物业费（单位元/㎡/月）：">
        <span>{{form.propertyCost}}</span>
      </el-form-item>
      <el-form-item label="物业公司：">
        <span>{{form.propertyCompany}}</span>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
  import { parseTime } from '@/utils/index'
  export default {
    props: {
      form: {
        type: Object,
        default: {}
      }
    },
    data() {
      return {
        dialogMapVisible: false,
        latitude: 30.575863,
        longitude: 103.922162
      }
    },
    methods: {
      changTime(date) {
        return parseTime(date,'{y}-{m}-{d}')
      },
      changeVisible(flag) {
        this.dialogMapVisible = flag
      },
      onSubmit() {
        this.$message('submit!')
      },
      onCancel() {
        this.$message({
          message: 'cancel!',
          type: 'warning'
        })
      }
    }
  }
</script>

<style scoped>
  .line {
    text-align: center;
  }
</style>

